<?php

include("../unittests.php");

$db = new Db();

$prep = $db->prepare("UPDATE user SET name = :new WHERE name = :name");
Assert::isTrue($prep instanceof Db_Statement_mysql);

$prep->name = "MIKE";
$prep->new = "foo";
$prep->execute();
Assert::isTrue($prep->valid(), $prep->errorMessage());
Assert::isTrue($prep->countRows() > 0);

$prep->name = "foo";
$prep->new = "MIKE";
$prep->execute();